﻿Imports System.Windows.Forms

Public Class frmCreateProject

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    ''' <summary>
    ''' Make first character upper case
    ''' </summary>
    Private Sub txt_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtProjectName.TextChanged, txtDescription.TextChanged
        Dim txt As TextBox = sender
        If txt.Text.Length = 1 Then
            txt.Text = txt.Text.ToUpper
            txt.SelectionStart = 1
        End If
    End Sub
End Class
